package com.wu.framework.upms.domain.entity;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity(name = "dictionary")
@Data
public class Dictionary {

    @Id
    @ApiModelProperty("id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "名称", example = "性别")
    private String name;

    @ApiModelProperty(value = "编码", example = "sex")
    private String code;

    @ApiModelProperty(value = "字典类型：‘1’代表列表，‘2’代表树形", example = "1")
    private Integer type;

    @ApiModelProperty("备注")
    private String description;

}
